﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace AMVCommander
{
    static class Program
    {

        private static System.Threading.Mutex m_instance;
        private const string m_appName = "AMVCommander";

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            bool tryCreateNewApp;
            m_instance = new System.Threading.Mutex(true, m_appName, out tryCreateNewApp);
            if (tryCreateNewApp)
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new FormMain());
            }
            else
            {
                MessageBox.Show("Невозможно запустить второй экземпляр приложения");
            }
        }

    }
}
